<!-- 
    实现一个遍历至100的循环,被3整除时输出three,被5整除时输出five,同时被整除时输出all
 -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    for(var i = 1; i<100; i++){
        // if(i%3===0 && i%5===0){
        //     console.log(i,'all');
        // }else if(i%5===0){
        //     console.log(i,'five');
        // }else if(i%3===0){
        //     console.log(i,'three');
        // };
        let str = (i%3===0 && i%5===0) ? 'all' : i%3===0 ? 'three' : i%5===0 ? 'five' : '';
        if(str) console.log(i,str)
    }
</script>
</html>